<template>
  <view>
    <m-top
      :autoBack="true"
      :bgChangeByScroll="true"
      bgColor="#8C82FF"
      @getHeight="getGlHeight"
    >
      <view class="c333 font32 fw500">重磅嘉宾</view>
    </m-top>

    <m-container :top="glTop">
      <view class="mgt32 pdv40">
        <view class="card" v-for="(item, index) in guestList" :key="index">
          <m-guest :option="item"></m-guest>
        </view>
      </view>
    </m-container>
  </view>
</template>

<script>
import GlTopMixin from "@/mixins/global-top";
import { getInfomationApi } from "@/api/modules/homepage.js";

export default {
  mixins: [GlTopMixin],
  components: {},
  data() {
    return {
      guestList: [],
    };
  },

  async onLoad() {
    uni.showLoading({
      title: "加载中",
    });
    try {
      const response = await getInfomationApi(59); // 重磅嘉宾
      this.guestList = response.data || [];
      console.log("重磅嘉宾列表", this.guestList);
    } catch (error) {}
    uni.hideLoading();
  },
};
</script>

<style lang="scss" scoped>
.card {
  // background-color: white;
  &:not(:first-child) {
    margin-top: 20rpx;
  }
}
</style>
